home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CBASE102.ARJ / BPUTH.C < prev    next >
Text File  |  1991-09-23  |  1KB  |  56 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)bputh.c    1.5 - 91/09/23" */
  5.  
  6. #include <ansi.h>
  7.  
  8. /* ansi headers */
  9. #ifdef AC_STDDEF
  10. #include <stddef.h>
  11. #endif
  12.  
  13. /* local headers */
  14. #include "blkio_.h"
  15.  
  16. /*man---------------------------------------------------------------------------
  17. NAME
  18.      bputh - put the header into a block file
  19.  
  20. SYNOPSIS
  21.      #include <blkio.h>
  22.  
  23.      int bputh(bp, buf)
  24.      BLKFILE *bp;
  25.      const void *buf;
  26.  
  27. DESCRIPTION
  28.      The bputh function writes the the contents of buf into the header
  29.      of block file bp.  buf must point to a storage area at least as
  30.      large as the header size for bp.
  31.  
  32.      bputh will fail if one or more of the following is true:
  33.  
  34.      [EINVAL]       bp is not a valid block file.
  35.      [EINVAL]       buf is the NULL pointer.
  36.      [BENOPEN]      bp is not open for writing.
  37.  
  38. SEE ALSO
  39.      bgeth, bputhf, bputb.
  40.  
  41. DIAGNOSTICS
  42.      Upon successful completion, a value of 0 is returned.  Otherwise,
  43.      a value of -1 is returned, and errno set to indicate the error.
  44.  
  45. ------------------------------------------------------------------------------*/
  46. #ifdef AC_PROTO
  47. int bputh(BLKFILE *bp, const void *buf)
  48. #else
  49. int bputh(bp, buf)
  50. BLKFILE *bp;
  51. const void *buf;
  52. #endif
  53. {
  54.     return bputhf(bp, (size_t)0, buf, bp->hdrsize);
  55. }
  56.